import { createApp } from 'vue'
import App from './App.vue'
import './style.css'
// 导入pinia
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// import 'ant-design-vue/lib/modal/style' // 或者 ant-design-vue/lib/button/style/css 加载 css 文件
import 'ant-design-vue/es/modal/style/css' // vite只能用 ant-design-vue/es 而非 ant-design-vue/lib
import setupDirectives from '@/directives/index'

// 导入路由
import router from '@/router/index'

// 导入windicss
import 'virtual:windi.css'

// 实例化pinia
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate) // 持久化

const app = createApp(App)
setupDirectives(app)
app.use(pinia).use(router).mount('#app')
